Improved retry strategy in httpx transport#848
Improved retry strategy in httpx transport#848rae-306 wants to merge 2 commits intoopensanctions:mainfrom
Conversation
|
Thanks for bringing this up! I have a few thoughts on this: First, I think the retry semantics on the streaming HTTP helpers are currently broken. I don't think the retry does any Range-request magic, so we'll just get the same source line Second, I'm a bit hesitant about introducing a dependency on While we're working on this, if you're on a bumpy connection, have you considered setting Looking forward to hear your thoughts! |
|
Hi Leon, thanks for your response. After hours of debugging, we finally managed to get it working. Our bumpy network would cause a TransportError every now and then while we were loading the "default" dataset with 4.1M entries.
|
IIUC, you would like the retry counter to be reset if at least one byte flows in again after a Does
Yeah, I guess the right thing to do here would be to reset the counter and retry in the indexer, but that's a lot of work touching a few layers for something that hasn't really been that much of an issue so far. How do you feel about #857. It tries to stream only once and then falls back to fetching. Does that solve your issue. Related, have you tried setting setting |
|
Closing this because the discussion is stalled and I think #857 is a better candidate to go in sometime. Feel free to re-open if you feel we should discuss this more. |
Ingestion failed for us because of our bumpy network.
It turns out that the retry strategy in
stream_http_linesis quite basic: retry 3 times and sleep 1 second in between.This PR improves the
stream_http_linesfunction retry strategy. It does so by defining a global retry strategy (exponential backoff) at the level of thehttpx_sessionclient defined in yente.data.util.